package com.demo.youxuanmall.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.time.LocalDateTime;

@Data
@TableName("user")
public class User {
    @TableId(type = IdType.AUTO)
    private Long id;
    
    private String username;
    
    private String password;
    
    @TableField(exist = false)
    private String oldPassword;
    
    private String nickname;
    
    private String phone;
    
    private String email;
    
    private String avatar;
    
    private Integer gender;
    
    private Integer status;
    
    private LocalDateTime lastLoginTime;
    
    private String lastLoginIp;
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    
    @TableField("is_deleted")
    private Integer isDeleted;

    @TableField("role")
    private Integer role;  // 角色(0:普通用户,1:管理员)
} 